#pragma once

#ifdef DEF_API_EXPORT
#define DEF_API_EXP extern "C" __declspec(dllexport) int _stdcall 
#else
#define DEF_API_EXP extern "C" __declspec(dllimport) int _stdcall 
#endif



DEF_API_EXP MotionOpen			(int ID,		char*	Addr,		int		nPort,char *isowned);
DEF_API_EXP MotionGetPrior      (int handle);
DEF_API_EXP MotionClose			(int handle);
DEF_API_EXP MotionSetRatio		(int handle,	float	fRatio[3]);
DEF_API_EXP MotionBackZero		(int handle,	short	iAxis);
DEF_API_EXP MotionClearZero		(int handle);
DEF_API_EXP MotionStop			(int handle);
DEF_API_EXP MotionIsStop		(int handle,	short	iAxis);
DEF_API_EXP MotionGetPos		(int handle,	short	iAxis,		int		&bIsAbs,	double	&fPosition);
DEF_API_EXP MotionGetVel		(int handle,	short	iAxis,		int		&bIsAbs,	double	&fVelocity);
DEF_API_EXP MotionMoveToPos		(int handle,	short	iAxis,		double	fSetPos,	double	fSetVel,	int		bIsAbs);
DEF_API_EXP MotionSetSineMove	(int handle,	short	iAxis,		double	fSetFreq,	double	fSetAmp,	int		iSetTime);
DEF_API_EXP MotionSetMaxAcc		(int handle,	float	fMaxAcc[3]);
DEF_API_EXP MotionSetTimer		(int handle,	int		nTimer);


typedef void (__stdcall *_SDK_CALLBACK_RECV)(int bIsStop[3], int bIsZero[3], int bIsSin[3], int bAbs[3], double fPos[3], double fSpd[2]);
DEF_API_EXP MotionRegisterCallBack_Recv(_SDK_CALLBACK_RECV fun);

